import { Redirect } from 'umi'

export default (props : any) => {
  const isLogin = true
  // const { isLogin } = useAuth();
  if (isLogin) {
    return <div>{ props.children }</div>;
  } else {
    return <Redirect to="/" />;
  }
}